[HVM] Hide contents of IA32_MCG_STATUS MSR from the guest.
authorTim Deegan <Tim.Deegan@xensource.com>
Wed, 18 Jul 2007 08:06:41 +0000 (09:06 +0100)
committerTim Deegan <Tim.Deegan@xensource.com>
Wed, 18 Jul 2007 08:06:41 +0000 (09:06 +0100)
It can't clear the MCE, and it probably can't understand it anyway.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmx.c

index d1fca8d1dcb94f000cb7f4d7ef91e9b1854f2cfa..7c13950859eef6cc477b92e97dda73d7a07cf86d 100644 (file)
@@ -2154,6 +2154,11 @@ static void svm_do_msr_access(
             svm_inject_exception(v, TRAP_gp_fault, 1, 0);
             break;
 
+        case MSR_IA32_MCG_STATUS:
+            /* No point in letting the guest see real MCEs */
+            msr_content = 0;
+            break;
+
         default:
             if ( rdmsr_hypervisor_regs(ecx, &eax, &edx) ||
                  rdmsr_safe(ecx, eax, edx) == 0 )
index ccf3a8fad0d92e824be5114b17b0f8bf64fc6839..1c22349161fa0fdf87d30283ae9b3913804679cd 100644 (file)
@@ -2622,6 +2622,10 @@ static int vmx_do_msr_read(struct cpu_user_regs *regs)
         break;
     case MSR_IA32_VMX_BASIC...MSR_IA32_VMX_PROCBASED_CTLS2:
         goto gp_fault;
+    case MSR_IA32_MCG_STATUS:
+        /* No point in letting the guest see real MCEs */
+        msr_content = 0;
+        break;
     default:
         switch ( long_mode_do_msr_read(regs) )
         {